﻿using System;
using Sanelib.Dto;

namespace Common.Commands.TrackLogCommands
{
    public class AddTrackLog : AuditedCommand
    {
        public string TagId { get; set; }
        public DateTime? DetectedOn { get; set; }

        public override Guid? GetAggregateId()
        {
            return null;
        }

        public override ErrorResult Validate()
        {
            var validationResult = new ErrorResult();

            if(string.IsNullOrEmpty(TagId))
                validationResult.AddError("Tag Id"," is required.");

            return validationResult;
        }
    }
}
